#include <stdio.h>     /*预处理*/
int main()             /*主函数*/
{
    int n,s;           /*定义变量*/
    char ch,x;

    printf("Please input the secret KEY:\n");
    scanf("%d",&n);
    getchar();         /*清除缓冲区*/
    printf("Please input a character:\n");
    scanf("%c",&ch);

    s=(n%26+26)%26;    /*取模操作保证索引在0-25之间*/
    if(ch+s>'z')       /*开始进行计算*/
        x=(ch+s)-'z'+'a'-1;
    else
        x=ch+s;

    printf("The encrypted character is:%c\n",x);     /*打印最终结果*/

    return 0;
}